<?php

use think\facade\Route;

Route::rule('/', function () {
    return redirect('/property');
});

if (!env('MULTI_DOMAIN_MODE', false)) {
    foreach (config('common_route') as $routeFn) {
        $routeFn();
    }
}
Route::miss(function () {
    file_put_contents(__DIR__ . '/miss_route.log', request()->url() . PHP_EOL . json_encode(request()->param(), JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND);
    return response()->code(404)->contentType('application/json');
});
